// JavaScript Document
function mopen(fun, params, win) {
	var params = params || {};
	if(typeof params.from=='undefined') {
		var html = eval('('+fun+'_html(params))');
	} else if(params.from=='id') {
		var html = $('#'+fun).html();
	}
	if(typeof win=='undefined') {
		dialog = $.dialog({lock:true,content:html});
	} else {
		eval('('+win+' = $.dialog({lock:true,content:html}))');
	}
}

//
function mclose(params, win) {
	if(typeof win=='undefined') {
		dialog.close();
	} else {
		eval('('+win+')').close();
	}
}